<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>Dashboard - Admin</title>
    <link href="{{.cdn}}/admin/css/styles.css" rel="stylesheet" />
    <script src="{{.cdn}}/admin/js/all.min.js" crossorigin="anonymous"></script>
</head>

<body class="sb-nav-fixed">
    <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
        <!-- Navbar Brand-->
        <a class="navbar-brand ps-3" href="/admin">柚子吧</a>
        <!-- Sidebar Toggle-->
        <button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i
                class="fas fa-bars"></i></button>
        <!-- Navbar Search-->
        <form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
            <div class="input-group">
                <input class="form-control" type="text" placeholder="Search for..." aria-label="Search for..."
                    aria-describedby="btnNavbarSearch" />
                <button class="btn btn-primary" id="btnNavbarSearch" type="button"><i
                        class="fas fa-search"></i></button>
            </div>
        </form>
        <!-- Navbar-->
        <ul class="navbar-nav ms-md-0 me-3 me-lg-4">
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown"
                    aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
                <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
                    <li><a class="dropdown-item" href="#!">Settings</a></li>
                    <li>
                        <hr class="dropdown-divider" />
                    </li>
                    <li><a class="dropdown-item" href="#!">Logout</a></li>
                </ul>
            </li>
        </ul>
    </nav>
    <div id="layoutSidenav">
        <div id="layoutSidenav_nav">
            <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
                <div class="sb-sidenav-menu">
                    <div class="nav">
                        <div class="sb-sidenav-menu-heading">Core</div>
                        <a class="nav-link" href="/admin">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            文章列表
                        </a>
                        <a class="nav-link" href="/admin/page">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            页面列表
                        </a>
                        <a class="nav-link" href="/admin/category">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            分类列表
                        </a>
                        <a class="nav-link" href="/admin/tag">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            标签列表
                        </a>
                        <a class="nav-link" href="/admin/visitlog">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            访问日志列表
                        </a>
                    </div>
                </div>
            </nav>
        </div>
        <div id="layoutSidenav_content">
            <main>
                <div class="container-fluid px-4">
                    <h1 class="mt-4">访问日志列表</h1>

                    <div class="card mb-4">
                        <div class="card-header">
                        </div>
                        <div class="card-body">
                            <table id="datatablesSimple">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>Ip</th>
                                        <th>国家</th>
                                        <th>省/州</th>
                                        <th>城市</th>
                                        <th>访问日期</th>
                                        <th>点击次数</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {{range .visitlogs}}
                                    <tr>
                                        <td>{{.Id}}</td>
                                        <td>{{.Ip}}</td>
                                        <td>{{.Country}}</td>
                                        <td>{{.Province}}</td>
                                        <td>{{.City}}</td>
                                        <td>{{.VisitDate}}</td>
                                        <td>{{.ClickCount}}</td>
                                    </tr>
                                    {{end}}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
    <script src="{{.cdn}}/admin/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
    <script src="{{.cdn}}/admin/js/scripts.js"></script>
    <script src="{{.cdn}}/admin/js/simple-datatables.js" crossorigin="anonymous"></script>
    <script src="{{.cdn}}/admin/js/datatables-simple-demo.js"></script>
</body>

</html>